package week9.Q4;

public class TestVehicle {
    public static void main(String[] args) {
        Developer developer = new Developer("zjj", 1);
        Vehicle[] vehicle = new Vehicle[3];
        vehicle[0] = new Bicycle("安特", "白色");
        vehicle[1] = new ElectricVehicle("雅迪", "蓝色");
        vehicle[2] = new Car("奔驰", "灰色", "4");
        for (int i = 0; i < vehicle.length; i++) {
            developer.takingVehicle(vehicle[i]);
            if (vehicle[i] instanceof IPower) {
                ((IPower) vehicle[i]).power();
            }
        }
    }
}
